<!DOCTYPE html>
<html>
    <head>
        <meta charset='utf-8'>
        <title></title>
        <style>
        </style>
        <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    </head>
    <body>
       <div id="app">
           <my-computer>
               <p slot="cup">intel i8</p>
               <img src="img/1.png" alt="" width="200" height="200" slot="gpu">
           </my-computer>
       </div>
       <template id="my_computer">
           <div>
               <slot name="cup">这里是插cpu的</slot>
               <slot name="gpu">这里是插gpu的</slot>
           </div>
       </template>
    </body>
</html>
<script>
Vue.component('my-computer',{
    template:'#my_computer'
})
    //1.创建vue实例
    let vm=new Vue({
        el:'#app'
    })
</script>